package com.tanguy.driver

/**
 * Created by dab on 2017/9/27 0027 16:05
 */

object Const {
    object Api {
        /**
         *  是否外网 true 外网
         */
        val isExtranet = false
        val SOCKET_SERVER = if (isExtranet) "www.mdchuxing.com" else "192.168.3.228"
        val BASE_URL = if (isExtranet) "http://www.mdchuxing.com/" else "http://192.168.3.228:8080/donLi/"
        val SOCKET_PORT = 8066
        //高德web端url
        val GAODE_URL = "http://restapi.amap.com/v3/"
    }

    object Accounts {
        //阿里云
        val OSS_AK = "LTAI9j1ITWhvjRgP"
        val OSS_AKS = "OBlJyWJbgdmCg9ukUtR7znxv9ZAbkK"
        val OSS_END_POINT = "http://oss-cn-beijing.aliyuncs.com"
        val BUCKET_NAME = "mingdi"
        val GAO_MAP_KEY = "8b96c4837d7a3881a7146e018f80eafa"
    }
    //h5页面
    object AppText {
        const val debug = true
        const val BAIDU = "http://www.baidu.com"
        private const val SERVER = "127.0.0.1:8080"
        private const val BASE_URL = "$SERVER/donLi/sys/apptext/getAppText?type="
        val Test=BAIDU
        //推荐有礼奖励规则
        val REWARD_RULES = if (debug) BAIDU else BASE_URL+0
        //充值返现协议
        val RECHARGE_REWARD_RULES = if (debug) BAIDU else BASE_URL+5
        //平台协议
        val PLATFORM_AGREEMENT = if (debug) BAIDU else BASE_URL+1
        //关于我们
        val ABOUT_US = if (debug) BAIDU else BASE_URL+3
    }

    //key
    object KEY {
        //高德地图web端key
        val GAODE_WEB_KEY = ""
        //阿里云
        val OSS_AK = "ht8L1fbbPdlMGkbT"
        val OSS_AKS = "QE9dutDJlVKPGKoQkxTewCCgM8WCfV"
        val OSS_END_POINT = "http://oss-cn-shenzhen.aliyuncs.com"
        val BUCKET_NAME = "xld-test"
        //微信支付
        val WECHAT_APP_ID = ""

    }

    object DEBUG {
        //所有的日志
        val All = true
        //响应的日志
        const val RESPONSE = true
        //请求的日志
        const val REQUEST = true

    }

    object SocketType {
        const val INTERVAL = 30*1000L//心跳间隔
        const val OK = "OK"//心跳
        const val LONCTION = "LONCTION"//发送位置成功的表示,才发送下一条
        const val USER_LOGIN = "USER_LOGIN"//单点登陆被挤推送标识
        const val LOTICO = "LOTICO"//司机上传位置
        const val CENLAN_LINEUP = "CENLAN_LINEUP"//自动取消司机排队标识
        const val DRIVER_LINEUP = "DRIVER_LINEUP"//司机进入可排队区域标识
        const val LINEUP_ZHONG = "LINEUP_ZHONG"//号码变化
        const val PAIORDER_DRIVER = "PAIORDER_DRIVER"//用户发单直接派单给了该司机 里面有个orderId订单ID,你们要跳到服务页面
        const val NEW_ORDERALLDRIVER = "NEW_ORDERALLDRIVER"//用户端有订单推给司机
        const val USER_CENLE_ORDER = "USER_CENLE_ORDER"//用户取消订单推送给司机的

    }

    object RxType {
        const val QUEUE_CHANGE="queue_change"//排队号码的变化
        const val CAN_QUEUE="can_queue"//可以排队
        const val ALLOT="allot"//派单
        const val REFRESH_MAIN_ORDER="refresh_main_order"//刷新主页的消息

    }
    object User {
        const val ID = "ID"//id
        const val PHONE = "phone"//PHONE
        const val PASSWORD = "password"//password
    }

    object RequestCode {
        val REGISTER = 0x1005//注册
        val FORGET = 0x1006//忘记密码
        //RequestCode
        val FLIGHT_NUMBER = 0x6000//航班号
        //司机注册
        val DRIVING_LICENCE = 0x6001//驾驶证
        val DRIVING_LICENSE = 0x6002//行驶证
        val CAR_INSURANCE = 0x6003//车险
        val GROUP_PHOTO = 0x6004//人车合影
        val VEHICLE_TYPE = 0x6005//车型


    }

    object IntentCode {
        //IntentCode
        val DriverRegister = "DriverRegister"//DriverRegister 对象
        val VEHICLE_TYPE = "vehicle_type"//车型ID
        val VEHICLE_STRING = "vehicle_type_string"//车型的字符串


        val PASSWORD = "password"//密码


    }
object Test{
    val NEW_ORDERALLDRIVER="{\"con\":{\"deplon\":104.055678,\"boulat\":30.63661,\"bourn\":\"锦城逸景B区\",\"boulon\":104.32759,\"bybustime\":1511926860000,\"departure\":\"成都东站\",\"totalkm\":13.339,\"ordertype\":3,\"msg\":\"您有新的订单\",\"km\":14.456,\"deplat\":30.586637,\"orderId\":36},\"method\":\"NEW_ORDERALLDRIVER\",\"code\":\"0\",\"msg\":\"SUCCESS\"}"
    val DRIVER_LINEUP = "{\"con\":{\"id\":5,\"code\":\"510100\",\"type\":2},\"method\":\"DRIVER_LINEUP\",\"code\":\"0\",\"msg\":\"SUCCESS\"}"
}
}
